/**
 * @summary 频道模块
 * @author 徐靖宇
 * @description
 *   7.25 新增全部频道数据
 */

import * as commentApi from '@/api/comment';

export default {
  namespaced: true,
  state: {
    // 文章评论列表
    articleCommentList: {},
  },
  mutations: {
    SET_ARTICLE_COMMENT_LIST(state, newValue) {
      state.articleCommentList = newValue;
    },
  },
  actions: {
    async updateArticleCommentList({ commit }, articleId) {
      const res = await commentApi.getArticleCommentList(articleId);
      commit('SET_ARTICLE_COMMENT_LIST', res);
    },
  },
};
